/**
 * @Description： RmoGrantController
 * @author： 20155872 游宇
 * @createTime: 2018-12-03 11:21 PM
 **/

package com.scb.dev.mms.controller;

import com.scb.dev.mms.common.ResponseResult;
import com.scb.dev.mms.service.IRmoGrantService;
import com.scb.dev.mms.service.impl.RmoGrantServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


import javax.ws.rs.GET;
import javax.ws.rs.Path;

/**
 * @className: RmoGrantController
 * @Description: RmoGrantController
 * @author: YouYu 游宇
 * @createTime: 2018-12-03 11:21 PM
 **/
@Slf4j
@RestController
@RequestMapping("/sm/RmoGrant")
@Api(value = "RmoGrantController", description = "RmoGrant API")
public class RmoGrantController {
    @Autowired
    private IRmoGrantService rmoGrantService;

    @ApiOperation(value="menuIdList", notes="you can use this API to get the all relative menuId according to roleId")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="path",name = "roleId",value = "roleId",required = true ,dataType = "String"),
    })
    @RequestMapping(value="/menuIdList/{roleId}",method = RequestMethod.GET)
    public ResponseResult selectMenuIdByRoleId(@PathVariable("roleId") String roleId){
        ResponseResult responseResult=new ResponseResult();
        responseResult=rmoGrantService.selectMenuIdByRoleId(roleId);
        return responseResult;
    }


}
